package org.example.model;


import static  org.example.enums.SqlTypeAndJavaTypeEnum.*;
public class Setting {

    public SettingProperties properties = new SettingProperties();

    public static Setting getInstance() {
        return new Setting();
    }

    public Setting.SettingProperties getState() {
        return properties;
    }

    public void loadState( Setting.SettingProperties state) {
        properties = state;
    }

    public static class SettingProperties {
        /**
         * 是否开启自动翻译
         */
        private Boolean autoTranslationRadio = false;
        /**
         * 翻译组件
         */
        private String translationAppComboBox = "";
        /**
         * appid
         */
        private String appIdText = "";
        /**
         * secret
         */
        private String secretText = "";
        /**
         * 腾讯云翻译secretId
         */
        private String secretId = "";
        /**
         * 腾讯云翻译secretKey
         */
        private String secretKey = "";
        /**
         * 表名使用的注解
         */
        private String tableAnnotation = "javax.persistence.Table";
        /**
         * 表名使用的注解属性
         */
        private String tableAnnotationProperty = "name";
        /**
         * id使用的注解
         */
        private String idAnnotation = "javax.persistence.Id";
        /**
         * 注释
         */
        private String commentAnnotation = "comment";

        private String intType = INT.getSqlType();

        private String longType = BIGINT.getSqlType();

        private String stringType = VARCHAR.getSqlType();

        private String booleanType = TINYINT.getSqlType();

        private String dateType = DATETIME.getSqlType();

        private String doubleType = DOUBLE.getSqlType();

        private String floatType = DOUBLE.getSqlType();

        private String bigDecimalType = DECIMAL.getSqlType();

        private String intDefaultLength = INT.getDefaultLength();

        private String longDefaultLength = BIGINT.getDefaultLength();

        private String stringDefaultLength = VARCHAR.getDefaultLength();

        private String doubleDefaultLength = DOUBLE.getDefaultLength();

        private String floatDefaultLength = DOUBLE.getDefaultLength();

        private String booleanDefaultLength = TINYINT.getDefaultLength();

        private String dateDefaultLength = DATETIME.getDefaultLength();

        private String bigDecimalDefaultLength = DECIMAL.getDefaultLength();


        public String getIntType() {
            return intType;
        }

        public void setIntType(String intType) {
            this.intType = intType;
        }

        public String getLongType() {
            return longType;
        }

        public void setLongType(String longType) {
            this.longType = longType;
        }

        public String getStringType() {
            return stringType;
        }

        public void setStringType(String stringType) {
            this.stringType = stringType;
        }

        public String getBooleanType() {
            return booleanType;
        }

        public void setBooleanType(String booleanType) {
            this.booleanType = booleanType;
        }

        public String getDateType() {
            return dateType;
        }

        public void setDateType(String dateType) {
            this.dateType = dateType;
        }

        public String getDoubleType() {
            return doubleType;
        }

        public void setDoubleType(String doubleType) {
            this.doubleType = doubleType;
        }

        public String getFloatType() {
            return floatType;
        }

        public void setFloatType(String floatType) {
            this.floatType = floatType;
        }

        public String getIntDefaultLength() {
            return intDefaultLength;
        }

        public void setIntDefaultLength(String intDefaultLength) {
            this.intDefaultLength = intDefaultLength;
        }

        public String getLongDefaultLength() {
            return longDefaultLength;
        }

        public void setLongDefaultLength(String longDefaultLength) {
            this.longDefaultLength = longDefaultLength;
        }

        public String getStringDefaultLength() {
            return stringDefaultLength;
        }

        public void setStringDefaultLength(String stringDefaultLength) {
            this.stringDefaultLength = stringDefaultLength;
        }

        public String getDoubleDefaultLength() {
            return doubleDefaultLength;
        }

        public void setDoubleDefaultLength(String doubleDefaultLength) {
            this.doubleDefaultLength = doubleDefaultLength;
        }

        public String getFloatDefaultLength() {
            return floatDefaultLength;
        }

        public void setFloatDefaultLength(String floatDefaultLength) {
            this.floatDefaultLength = floatDefaultLength;
        }

        public String getBooleanDefaultLength() {
            return booleanDefaultLength;
        }

        public void setBooleanDefaultLength(String booleanDefaultLength) {
            this.booleanDefaultLength = booleanDefaultLength;
        }

        public String getDateDefaultLength() {
            return dateDefaultLength;
        }

        public void setDateDefaultLength(String dateDefaultLength) {
            this.dateDefaultLength = dateDefaultLength;
        }

        public String getBigDecimalType() {
            return bigDecimalType;
        }

        public void setBigDecimalType(String bigDecimalType) {
            this.bigDecimalType = bigDecimalType;
        }

        public String getBigDecimalDefaultLength() {
            return bigDecimalDefaultLength;
        }

        public void setBigDecimalDefaultLength(String bigDecimalDefaultLength) {
            this.bigDecimalDefaultLength = bigDecimalDefaultLength;
        }
    }
}